TARGET_BOARD_PLATFORM := mt6737m

# Use the non-open-source part, if present
-include vendor/teksun/b861_648_ft_xiangmi_x032/BoardConfigVendor.mk

# Use the 6735 common part
include device/mediatek/mt6735/BoardConfig.mk

#Config partition size
-include $(MTK_PTGEN_OUT)/partition_size.mk
BOARD_CACHEIMAGE_FILE_SYSTEM_TYPE := ext4
BOARD_FLASH_BLOCK_SIZE := 4096
# xunhu_project_change_begin 
include ../teksun/xunhu_public/ProjectConfig.mk
# xunhu_project_change_end
include device/teksun/$(MTK_TARGET_PROJECT)/ProjectConfig.mk

MTK_INTERNAL_CDEFS := $(foreach t,$(AUTO_ADD_GLOBAL_DEFINE_BY_NAME),$(if $(filter-out no NO none NONE false FALSE,$($(t))),-D$(t)))
MTK_INTERNAL_CDEFS += $(foreach t,$(AUTO_ADD_GLOBAL_DEFINE_BY_VALUE),$(if $(filter-out no NO none NONE false FALSE,$($(t))),$(foreach v,$(shell echo $($(t)) | tr '[a-z]' '[A-Z]'),-D$(v))))
MTK_INTERNAL_CDEFS += $(foreach t,$(AUTO_ADD_GLOBAL_DEFINE_BY_NAME_VALUE),$(if $(filter-out no NO none NONE false FALSE,$($(t))),-D$(t)=\"$($(t))\"))
# xunhu_project_change_begin 
define .make-upper
$(shell echo $(1) | tr '[a-z]' '[A-Z]')
endef
define .if-cfg-on
$(if $(filter-out 0 NO NONE FALSE,$(call .make-upper,$(strip $($(1))))),$(2),$(3))
endef
define xunhu.custom.generate-macros
$(strip $(foreach t,$(XUNHU_AUTO_ADD_GLOBAL_DEFINE_BY_NAME),$(call .if-cfg-on,$(t),-D$(call .make-upper,$(t))))
$(foreach t,$(XUNHU_AUTO_ADD_GLOBAL_DEFINE_BY_NAME_VALUE),$(call .if-cfg-on,$(t),$(foreach v, $(call .make-upper,$($(t))),-D$(v))))
$(foreach t,$(XUNHU_AUTO_ADD_GLOBAL_DEFINE_BY_INT_VALUE),$(call .if-cfg-on,$(t),-D$(call .make-upper,$(t))=$($(t))))
$(foreach t,$(XUNHU_AUTO_ADD_GLOBAL_DEFINE_BY_VALUE),$(call .if-cfg-on,$(t),-D$(call .make-upper,$(t))=\"$($(t))\")))
endef
ifeq ($(wildcard out/xunhu.macros),)
$(shell mkdir out/)
endif
$(shell echo $(call xunhu.custom.generate-macros) > out/xunhu.macros)
MTK_INTERNAL_CDEFS +=$(call xunhu.custom.generate-macros)
# xunhu_project_change_end
COMMON_GLOBAL_CFLAGS += $(MTK_INTERNAL_CDEFS)
COMMON_GLOBAL_CPPFLAGS += $(MTK_INTERNAL_CDEFS)

ifneq ($(MTK_K64_SUPPORT), yes)
BOARD_KERNEL_CMDLINE = bootopt=64S3,32N2,32N2
else
BOARD_KERNEL_CMDLINE = bootopt=64S3,32N2,64N2
endif
-include device/mediatek/build/build/tools/base_rule_remake.mk
